package com.new_wear.project.system.illegal.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.new_wear.project.system.illegal.mapper.IllegalMapper;
import com.new_wear.project.system.illegal.domain.Illegal;
import com.new_wear.project.system.illegal.service.IIllegalService;
import com.new_wear.common.utils.text.Convert;

/**
 * 违法信息Service业务层处理
 * 
 * @author new_wear
 * @date 2019-12-23
 */
@Service
public class IllegalServiceImpl implements IIllegalService 
{
    @Autowired
    private IllegalMapper illegalMapper;

    /**
     * 查询违法信息
     * 
     * @param id 违法信息ID
     * @return 违法信息
     */
    @Override
    public Illegal selectIllegalById(Long id)
    {
        return illegalMapper.selectIllegalById(id);
    }

    /**
     * 查询违法信息列表
     * 
     * @param illegal 违法信息
     * @return 违法信息
     */
    @Override
    public List<Illegal> selectIllegalList(Illegal illegal)
    {
        return illegalMapper.selectIllegalList(illegal);
    }

    /**
     * 新增违法信息
     * 
     * @param illegal 违法信息
     * @return 结果
     */
    @Override
    public int insertIllegal(Illegal illegal)
    {
        return illegalMapper.insertIllegal(illegal);
    }

    /**
     * 修改违法信息
     * 
     * @param illegal 违法信息
     * @return 结果
     */
    @Override
    public int updateIllegal(Illegal illegal)
    {
        return illegalMapper.updateIllegal(illegal);
    }

    /**
     * 删除违法信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteIllegalByIds(String ids)
    {
        return illegalMapper.deleteIllegalByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除违法信息信息
     * 
     * @param id 违法信息ID
     * @return 结果
     */
    @Override
    public int deleteIllegalById(Long id)
    {
        return illegalMapper.deleteIllegalById(id);
    }
}
